import java.util.LinkedList;

/**
 * @Author: Lenovo
 * @Date: 2024/7/14 22:31
 * @description:
 */
public class Test {
    public static void main(String[] args) {
        LinkedList<Integer>list = new LinkedList<>();
        list.addFirst(2);
        list.addLast(3);
        list.add(1,4);
        System.out.println(list);
        LinkedList<Integer>list1 = new LinkedList<>(list);
        list1.add(100);
        System.out.println(list1);
        list1.addAll(list);
        System.out.println(list1);
    }
    public static void main1(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        /*myLinkedList.addFirst(1);
        myLinkedList.addFirst(2);
        myLinkedList.addFirst(3);
        myLinkedList.addFirst(4);
        myLinkedList.display();*/
        myLinkedList.addLast(12);
        myLinkedList.addLast(12);
        myLinkedList.addLast(23);
        myLinkedList.addLast(45);
        myLinkedList.addLast(34);
        myLinkedList.addLast(45);
        myLinkedList.addLast(56);
        myLinkedList.display();
        myLinkedList.removeAllKey(12);
        myLinkedList.display();
        myLinkedList.clear();
        myLinkedList.display();
    }
}
